import {createApp} from 'vue';
import './style.scss';
import App from './App.vue';
// 引入路由
import router from './router';
// 引入vant组件库
import vant from 'vant'
import 'vant/lib/index.css'
// 引入二次封装的axios
import Request from "./utils/Request";
// 引入vuex
import store from './store';
// 引入iconfont
import "@/assets/icon/iconfont.css";
// 轮播图
import Carousel from '@/components/Carousel.vue';
// 底部音乐播放组件
import AudioPlay from './components/AudioPlay.vue'
// 歌单item
import SongSheetItem from '@/components/find/SongSheetItem.vue';
// 歌手item
import SingerItem from '@/components/SingerItem.vue';

// ◆导入 图片懒加载指令
import lazyPlugin from 'vue3-lazy';
import loadingImg from '@/assets/loading.gif';

const app = createApp(App);

app.config.globalProperties.$Request = Request;


app.component("Carousel", Carousel).component("SongSheetItem", SongSheetItem).component("SingerItem",SingerItem).component("AudioPlay",AudioPlay);
app.use(router);
app.use(lazyPlugin,{
    loading: loadingImg,
    error: loadingImg
});
app.use(vant);
app.use(store);
app.mount('#app');